package com.lonely.fx.bind;

import javafx.beans.binding.BooleanBinding;
import javafx.beans.property.SimpleIntegerProperty;

/**
 * @date: 2022-07-24 13:28
 * @author: ztkj-hzb
 * @description:
 **/
public class BindJudgmentSettingMain {

    public static void main(String[] args) {

        SimpleIntegerProperty a = new SimpleIntegerProperty(10);

        SimpleIntegerProperty b = new SimpleIntegerProperty(5);

        SimpleIntegerProperty c = new SimpleIntegerProperty(20);

        //大于
        System.out.println(a.greaterThan(b));
        //大于等于
        System.out.println(a.greaterThanOrEqualTo(b));
        //小于
        System.out.println(a.lessThan(b));
        //小于等于
        System.out.println(a.lessThanOrEqualTo(b));
        //相同
        System.out.println(b.isEqualTo(c));
        //不相同
        System.out.println(b.isNotEqualTo(c));

        //判断b是否再 c差距5范围内(15~25)
        System.out.println(b.isEqualTo(c,5));

    }


}
